//app.js
App({
  globalData: {},
  getSystemInfo: function () {
    wx.getSystemInfo({
      success: e => {
        this.globalData.StatusBar = e.statusBarHeight;
        let custom = wx.getMenuButtonBoundingClientRect();
        this.globalData.Custom = custom;  
        this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
        this.globalData.screenHeight = e.screenHeight;
      }
    })
  },
  isCloud: function () {
    if (!wx.cloud) {
      console.error('请使用 2.2.3 或以上的基础库以使用云能力')
    } else {
      wx.cloud.init({
        env:"smalltool-5ezhy",
        traceUser: true
      })
    }
  },
  onLaunch: function () {
    let that = this;
    that.isCloud();
    that.getSystemInfo();
  }
})